package homework;

public class Circle {
    private double radius;
    public static final double PI=3.1415926;
    public void setRadius(double radius){
        this.radius=radius;
    }
    public double getRadius(){
        return radius;
    }

    public double getCumference(){
        return 2*PI*radius;
    }

    public double getArea(){
        return PI*radius*radius;
    }
    public static void main(String[] args){
        Circle circle=new Circle();
        circle.setRadius(4.0);
        double circumference=circle.getCumference();
        double area=circle.getArea();

        System.out.println("半径为"+circle.getRadius()+"的圆的周长是"+circumference+",面积是"+area);
    }
}
